module.exports = (date) => {
  let time = (new Date().getTime()-date.getTime())/60000
  if(time<1) {
    return '刚刚'
  } else if (time<60){
    return parseInt(time)+'分钟前'
  } else if (time<1440){
    return parseInt(time/60)+'小时前'
  } else {
    return parseInt(time/1440)+'天前'
  }
}